<?php
/**
 * QueueJob.php
 *
 * @author: cnx7 <zysafe@live.cn> 2020-04-08
 */

namespace app\queue;

use yii\base\BaseObject;
use yii\queue\Job;

/**
 * 队列任务
 */
class QueueJob extends BaseObject implements Job
{

    public $data;

    /**
     * @inheritDoc
     *
     * pushJob:
     * $queueId = \Yii::$app->queue->push(new QueueJob(['data' => $data]));
     */
    public function execute($queue)
    {
        $id = $this->data;
    }
}